﻿/* =========================
   B2B Cart UI Component CSS
   ========================= */

/* wrapper */
.b2b-cart-ui {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* add button (در چند جا استفاده شده) */
.b2b-btn-add {
    height: 40px !important;
    border-radius: 12px !important;
    padding: 0 12px !important;
    white-space: nowrap;
}

/* qty control container */
.b2b-qty-control {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

/* qty buttons */
.b2b-qty-btn {
    width: 34px;
    height: 34px;
    border: none;
    background: #f5f5f5;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* qty input */
.b2b-qty-input {
    width: 44px;
    height: 34px;
    border: none;
    text-align: center;
    font-weight: 600;
    outline: none;
    direction: ltr;
}

/* small variant */
.b2b-cart-ui.small .b2b-qty-btn,
.b2b-qty-control.small .b2b-qty-btn {
    width: 30px;
    height: 30px;
}

.b2b-cart-ui.small .b2b-qty-input,
.b2b-qty-control.small .b2b-qty-input {
    width: 40px;
    height: 30px;
}

/* اگر داخل دکمه آیکون ti داری */
.b2b-qty-btn .ti {
    font-size: 16px;
}

/* نمایش/عدم نمایش بر اساس data-mode */
.b2b-cart-ui[data-mode="add"] .b2b-qty-control {
    display: none !important;
}

.b2b-cart-ui[data-mode="add"] .b2b-btn-add {
    display: inline-flex !important;
}

.b2b-cart-ui[data-mode="qty"] .b2b-qty-control {
    display: flex !important;
}

.b2b-cart-ui[data-mode="qty"] .b2b-btn-add {
    display: none !important;
}

/* ترتیب دکمه‌ها (طبق CSS شما) */
.b2b-qty-btn.plus {
    order: 1;
}

.b2b-qty-input {
    order: 2;
}

.b2b-qty-btn.minus {
    order: 3;
}

/* حالت ماکس/غیرفعال */
.b2b-qty-btn.plus.is-max,
.b2b-qty-btn.plus:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}


